<?php
/*****************************************************
 * File name: ConfigModel.php
 * Create date: 2019/05/06
 * Author: liuyue
 * Description: 配置数据库接口
 *****************************************************/

namespace Model;

use Lib;

class ConfigModel
{
    private $db = null;

    public function __construct()
    {
        $this->db = Lib\Db\DbModel::init(); // 构造方法，线上自动切换
    }

    /**
     * 获取相应的配置信息
     * @param $whereItems
     * @param $itemFields
     * @return array
     */
    public function getConfigItems($whereItems,$itemFields)
    {

        $configItemsRes = $this->db->table('tbconfig')->where($whereItems)->find($itemFields);

        return $configItemsRes;
    }
}